/**
 * FileName: EventSpringMain Author:   baoy Date:     2018/10/16 16:06 Description:
 */
package com.baoy.xxx.guava.eventbus.spring;

import com.google.common.eventbus.EventBus;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class EventSpringMain {


    public static void main(String[] arg) {
        AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
        ctx.register(UserService.class);
        ctx.register(EventSubscribeBeanPostProcessor.class);
        ctx.register(EventBus.class);

        ctx.refresh();

        EventBus bus = ctx.getBean(EventBus.class);
        bus.post("hao");
    }
}
